<%@ Control Language="C#" AutoEventWireup="true" CodeFile="DntSearchControl.ascx.cs" Inherits="includes_DntSearchControl" %>
<%--  <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>--%>

<script>

    //<![CDATA[

<%if (IsPostBack){%>
    //showWorking();
    //workingWin.close(); 
      <%} %>
    function <%=this.ClientID%>chkError() {
        arr = new Array(
        document.getElementById('<%=txtLName.ClientID%>'),
       document.getElementById('<%=txtFName.ClientID%>'),
       <%if (this.fromPage != null && this.fromPage != "" && this.fromPage.ToString() == "RateDoctors"){ %>
       document.getElementById('<%=ddlhospital.ClientID%>'),
       document.getElementById('<%=ddlInsurance.ClientID%>'),
       <%} %>
       document.getElementById('<%=ddlState.ClientID%>'),
        document.getElementById('<%=txtCity.ClientID%>'),
        document.getElementById('<%=txtZipCode.ClientID%>'),
        document.getElementById('<%=ddlSpeciality.ClientID%>'))
       count = 0;
       for (i = 0; i < arr.length; i++) {
           if (trim(eval(arr[i]).value) != "0" && trim(eval(arr[i]).value) != "") {
               count++;
           }
       }
       if (count < 2) {
           alert("Please select atleast 2 conditions for search");
           return false;
       }
       if (chkMinLen(document.getElementById('<%=txtCity.ClientID%>'), 3))
               if (chkMinLen(document.getElementById('<%=txtZipCode.ClientID%>'), 5))
                   if (chkMinLen(document.getElementById('<%=txtLName.ClientID%>'), 3))
                    if (chkMinLen(document.getElementById('<%=txtFName.ClientID%>'), 1)) {
                       // showWorking();
                        return true;
                    }
                    else
                        return false;
                else
                    return false;
            else
                return false;
        else
            return false;
       // showWorking();
        return true;
    }

    //]]>

</script>
    
                   
     <asp:HiddenField ID="hfIsToShowMessage" runat="server" />
        <table cellpadding="1" cellspacing="0" border="0" width="250">
            <tr>
                <td class="bodytxt" style="width: 80px;">&nbsp;First Name :</td>
                <td class="bodytxt" style="width: 10px;"></td>
                <td>
                    <asp:TextBox ID="txtFName" runat="server" CssClass="mainselection"  Width="148px"></asp:TextBox></td>
            </tr>
            <tr>
                <td class="bodytxt">&nbsp;Last Name :</td>
                <td class="bodytxt" style="width: 10px"></td>
                <td>
                    <asp:TextBox ID="txtLName" runat="server" CssClass="mainselection"  Width="148px"></asp:TextBox></td>
            </tr>
            <tr>
                <td class="bodytxt" style="height: 22px;" nowrap="true">&nbsp;Major Specialty :</td>
                <td class="bodytxt" style="height: 22px; width: 10px;"></td>
                <td style="height: 22px">
                    <div class="styled-select" style="width: 150px"><asp:DropDownList style="width: 170px" runat="server" ID="ddlSpeciality"></asp:DropDownList></div>
                </td>
            </tr>
            <tr>
                <td class="bodytxt" style="height: 22px;" nowrap="true">&nbsp;Country :</td>
                <td class="bodytxt" style="height: 22px; width: 10px;"></td>
                <td style="height: 22px">
                    <div class="styled-select" style="width: 150px"><asp:DropDownList style="width: 170px" runat="server"
                        ID="ddlCountry" OnSelectedIndexChanged="ddlCountry_SelectedIndexChanged"
                        AutoPostBack="True">
                    </asp:DropDownList></div>
                </td>
            </tr>
            <tr>
                <td class="bodytxt" style="width: 80px;">&nbsp;State/Province :</td>
                <td class="bodytxt" style="width: 10px;"></td>
                <td>
                    <div class="styled-select" style="width: 150px"><asp:DropDownList ID="ddlState" runat="server"  style="width: 170px"/></div></td>
            </tr>
            <tr>
                <td class="bodytxt" style="width: 80px; height: 24px;">&nbsp;City :</td>
                <td class="bodytxt" style="width: 10px; height: 24px;"></td>
                <td style="height: 24px">
                    <asp:TextBox ID="txtCity" runat="server" CssClass="mainselection"  Width="148px"></asp:TextBox></td>
            </tr>
            <tr>
                <td class="bodytxt" colspan="3">&nbsp;OR</td>
            </tr>
            <tr>
                <td class="bodytxt" style="width: 80px; height: 24px;">&nbsp;Zip Code :</td>
                <td class="bodytxt" style="width: 10px; height: 24px;"></td>
                <td style="height: 24px">
                    <asp:TextBox ID="txtZipCode" runat="server" CssClass="mainselection"  Width="148px"></asp:TextBox></td>
            </tr>
            <tr runat="server" id="tr_Hospital" visible="false">
                <td class="bodytxt" style="width: 80px; height: 22px;">&nbsp;Hospital :</td>
                <td class="bodytxt" style="height: 22px; width: 10px;"></td>
                <td style="height: 22px">
                    <div class="styled-select" style="width: 150px"><asp:DropDownList ID="ddlhospital" runat="server" style="width: 170px" /></div>
                </td>
            </tr>
            <tr runat="server" id="tr_Insurance" visible="false">
                <td class="bodytxt" style="width: 80px; height: 22px;">&nbsp;Insurance :</td>
                <td class="bodytxt" style="height: 22px; width: 10px;"></td>
                <td style="height: 22px">
                    <div class="styled-select" style="width: 150px"><asp:DropDownList ID="ddlInsurance" runat="server" style="width: 170px" /></div>
                </td>
            </tr>
           <%-- <% // Response.Write(this.fromPage.ToString()); %>
            <% if (this.fromPage.ToString() == "RateDoctors")
               {%>
            <tr runat="server" id="tr1" visible="true">
                <td class="bodytxt" style="width: 80px; height: 22px;">&nbsp;</td>
            </tr>
            <%} %>--%>

            <tr>
                <td colspan="3" style="float: right">
                    <br />
                    <asp:Button runat="server" Text="Search" CssClass="buttonclass" ID="btnSubmit" OnClick="btnSubmit_Click" /><br />
                </td>
            </tr>
        </table>
     
<script>
    try {
        workingWin.close();
    } catch (e) { }
</script>
